package com.example.forum.services;

import com.example.forum.model.Message;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IMessageService {
    void create (Message message);

    Integer selectUnreadCount(Long receiveUserId);

    List<Message> selectByReceiveUserId(Long receiveUserId);

    void updateStateById(Long id, Byte state);

    // 根据id查询站内信
    Message selectById(Long id);

    // 回复站内信
    @Transactional
    void reply(Long repliedId, Message message);
}
